1. Field of the Invention
The present invention relates to a voltage regulator, and more particularly to a voltage regulator equipped with a reverse-current prevention function to prevent reverse current from an external power supply such as a backup battery connected to an output terminal.
2. Background Art
FIG. 3 is a circuit diagram of a voltage regulator equipped with a reverse-current prevention function.
The voltage regulator equipped with a reverse-current prevention function includes a reference voltage circuit 401, an error amplifier 402, an Nch transistor 400, Pch transistors 403, 404, 405, and 406, voltage dividing resistors 407 and 408, and a comparison circuit 430.
The source voltage (VBAT 1) is applied between a VDD terminal and a VSS terminal. A backup battery 412 and a load 413 (e.g., a semiconductor memory device) are connected to an output terminal OUT.
First, the operation of the voltage regulator when the source voltage is being supplied between the VDD terminal and the VSS terminal will be described. The relation between the source voltage and the voltage (VBAT 2) of the backup battery 412 is generally as follows: VBAT 1>VBAT 2.
The error amplifier 402 amplifies a difference voltage between feedback voltage VFB obtained by dividing output voltage VOUT of the output terminal OUT through the resistor 407 and the resistor 408 and reference voltage Vref output from the reference voltage circuit 401 to control the gate of the Pch transistor 403. The output voltage VOUT at the output terminal OUT is kept constant. The comparison circuit 430 compares the source voltage input to an input terminal 121 with the output voltage VOUT input to an input terminal 122 to output a signal to a CONTX terminal 110 and a CONT terminal 111.
FIG. 4 shows a conventional comparison circuit 430. The comparison circuit 430 is composed of a constant current circuit 103, a constant current circuit 104, a Pch transistor 101, a Pch transistor 102, an inverter 105, an inverter 106, an inverter 108, and a level shifter 107.
Since the source voltage is higher than the output voltage VOUT, the gate-source voltage of the Pch transistor 101 is higher than the gate-source voltage of the Pch transistor 102. Therefore, the voltage at the drain of the Pch transistor 102 becomes an “L” level (the voltage at the VSS terminal). The inverters 105 and 106 for waveform shaping cause the voltage at the CONT terminal 111, to which the output of the inverter 106 is connected, to become the “L” level. The voltage at the CONTX terminal 110 becomes an “H” level (source voltage) because of going through the level shifter 107 and the inverter 108. Therefore, since the Pch transistor 405 is turned ON and the Pch transistor 406 is turned OFF, the substrate voltage of the Pch transistor 403 becomes the source voltage.
Next, the operation of the voltage regulator when the supply of the source voltage is reduced will be described. The relation between the source voltage and the voltage of the backup battery 412 is as follows: VBAT 1<VBAT 2.
When the source voltage drops below the output voltage VOUT, the gate-source voltage of the Pch transistor 101 becomes lower than the gate-source voltage of the Pch transistor 102. Therefore, the potential of the drain of the Pch transistor 102 becomes an “H” level (output voltage VOUT). The inverters 105 and 106 for waveform shaping cause the voltage at CONT terminal 111 as the output of the inverter 106 to become the “H” level (output voltage VOUT). The voltage at the CONTX terminal 110 becomes an “L” level because of going through the level shifter 107 and the inverter 108. Therefore, since the Pch transistor 405 is turned OFF and the Pch transistor 406 is turned ON, the substrate voltage of the Pch transistor 403 becomes the output voltage VOUT.
In other words, the potential of the substrate (NWELL) of the Pch transistor 403 is switched to a higher side of the source voltage and the output voltage to prevent electric current from flowing from the output terminal OUT through an inter-substrate parasitic diode of the Pch transistor 403 even when the source voltage drops below the voltage at the input terminal 122 (for example, see Patent Document 1).
[Patent Document 1] Japanese Patent Application Laid-Open No. 2011-65634